import * as React from 'react';
import '../styles.less';
import ParagraphCard from '../../../components/ParagraphCard'
import { insertHtmlAfterParagraph } from '../../../utils/WordUtil'
import * as ReactDom from 'react-dom';

export interface NewsProps {
  res: any[]
  isNeedParent?: boolean
}

export interface NewsStates {

}

export default class News extends React.Component<NewsProps, NewsStates> {
  constructor(props, context) {
    super(props, context);
  }

  render() {
    const { res, isNeedParent } = this.props
    const { content }: any = res
    return (
      <div className='news'>
        {
          isNeedParent ? <ParagraphCard
          >
          </ParagraphCard> : (
            <div dangerouslySetInnerHTML={{ __html: content }} />
          )
        }
      </div>
    );
  }

}
